package ar.edu.utn.frba.disenio.aterrizar;
import ar.edu.utn.frba.disenio.aterrizar.*;
import static org.junit.Assert.*;
import org.junit.Test;
import ar.edu.utn.frba.disenio.aterrizar.Norteamericano;





public class TestNorteAmericano {
	
	@Test
		public  void testSuccess(){
	 	Norteamericano norte;
	 	norte = new Norteamericano() ;
	 	assertTrue(!norte.parsear("12-30-2013").equals(null));
	 	
	}	  
	
		
			@Test (expected = NoEsParseablePorFormatoException.class)  
			public  void testFailFormatoInvalidoLatino(){
			Norteamericano norte ;
			norte = new Norteamericano();
			norte.parsear("12/30/2010");
		    	}
	
			@Test (expected = NoEsParseablePorFormatoException.class)  
			public  void testFailFormatoInvalidoInter(){
					Norteamericano norte ;
					norte = new Norteamericano();
					norte.parsear("2010-12-30");
				    	}
			@Test (expected =NoEsParseablePorFormatoException.class)
			public  void testFailFechaVacia(){
		
			Norteamericano norte ;
	 		norte = new Norteamericano();
			norte.parsear(" ");
			}
	
			@Test (expected = NoEsParseablePorFormatoException.class)  
			public  void testFailConCaracteresRandom(){
			Norteamericano norte ;
			norte = new Norteamericano();
			norte.parsear("@·$%&/--$%");
			}
		
			@Test (expected = ParserErrorNumeroNoValidoException.class)  
			public  void testFailConCaracteresRandomRespetandoGuiones(){
			Norteamericano norte ;
			norte = new Norteamericano();
		   	norte.parsear("@½-&%-(/%l");
		}  	
			@Test (expected = NoEsParseablePorFormatoException.class)  
			public  void testFailFechaConLetras(){
				Norteamericano norte ;
				norte = new Norteamericano();
				norte.parsear("letras");
		}
	
}	




